/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package org.abc;

import java.util.Date;

/**
 * <p>Project: jse2303 - OP5
 * <p>Powered by webrx On 2023-07-06 17:32:55
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class OP5 {
    public static void main(String[] args) {

        // (!!false ? 值 : 值)
        // 数据类型 变量名 = 条件 ? 值1 : 值2;
        String ok = Math.random() > .3 ? "中奖" : "未中奖";
        System.out.println(ok);


        System.out.println(true ? 10 : 100);

        System.out.printf("%tp", System.currentTimeMillis());
        System.out.println();
        String s = new Date().getHours() < 12 ? "上午" : "下午";
        System.out.println(s);

        int record = 100;
        int pagesize = 15;
        //求总共多少页
        int pagecount = record % pagesize == 0 ? record / pagesize : record / pagesize + 1;
        System.out.println(pagecount);


    }
}
